﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="products.ascx.cs" Inherits="controls_client_products" %>
<%@ Register src="rate.ascx" tagname="rate" tagprefix="vst" %>
 <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr align="center">
        <td>
            <asp:DataList ID="listproduct" runat="server" GridLines="Both" 
                onitemcommand="productlist_ItemCommand" 
                DataKeyField="Id" RepeatColumns="2">
                <ItemTemplate>
                    <table cellpadding="0" cellspacing="0" width="305">
                        <tr>
                            <td align="center" rowspan="4" valign="top" width="120">
                                <asp:Image ID="pImage" runat="server" AlternateText='<%# Eval("TenSanPham") %>' 
                                    Height="120px" ImageUrl='<%# "~/images/products/thumb/" + Eval("Hinh") %>' 
                                    Width="120px" />
                                <br />
                                <asp:ImageButton ID="pBuy" runat="server" Height="50px" 
                                    ImageUrl="~/images/button/buy.png" Width="100px" CommandName="buy" />
                            </td>
                            <td align="center" width="380">
                                <asp:Label ID="pName" runat="server" Font-Bold="True" ForeColor="Blue" 
                                    Text='<%# Eval("TenSanPham") %>'></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="Label2" runat="server" Font-Bold="False" Text="Giá :"></asp:Label>
                                &nbsp;<asp:Label ID="pPrice" runat="server" Text='<%# Eval("DonGia") + " vnđ" %>' 
                                    Font-Bold="True" ForeColor="Red"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="left">
                                <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Italic="True" 
                                    ForeColor="#3399FF" Text="Thông tin"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td height="130" valign="top" align="left">
                                <asp:Label ID="pDescription" runat="server" Text='<%# Eval("Mota") %>'></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" colspan="2">
                                <vst:rate ID="rate" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                &nbsp;</td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:DataList>
        </td>
    </tr>
    <tr align="center">
        <td>
	        <table cellpadding="0" border="0" id="PhanTrang" runat ="server">
                <tr>
                    <td align="right">
                        <asp:LinkButton ID="lbtnFirst" runat="server" CausesValidation="false" OnClick="lbtnFirst_Click">Trang đầu</asp:LinkButton>&nbsp;
                    </td>
                    <td align="right">
                        <asp:LinkButton ID="lbtnPrevious" runat="server" CausesValidation="false" OnClick="lbtnPrevious_Click">Trang trước</asp:LinkButton>&nbsp;&nbsp;</td>
                    <td align="center" valign="middle">
                        <asp:DataList ID="dlPaging" runat="server" RepeatDirection="Horizontal" OnItemCommand="dlPaging_ItemCommand"
                            OnItemDataBound="dlPaging_ItemDataBound">
                            <ItemTemplate>
                                <asp:LinkButton ID="lnkbtnPaging" runat="server" CommandArgument='<%# Eval("PageIndex") %>'
                                    CommandName="Paging" Text='<%# Eval("PageText") %>'></asp:LinkButton>&nbsp;
                            </ItemTemplate>
                        </asp:DataList>
                    </td>
                    <td align="left">&nbsp;&nbsp;
                        <asp:LinkButton ID="lbtnNext" runat="server" CausesValidation="false"
                            OnClick="lbtnNext_Click">Trang tiếp</asp:LinkButton></td>
                    <td align="left">&nbsp;
                        <asp:LinkButton ID="lbtnLast" runat="server" CausesValidation="false" OnClick="lbtnLast_Click">Trang cuối</asp:LinkButton>
                    </td>
                </tr>
                <tr>
                    <td colspan="5" align="center" style="height: 30px" valign="middle">
                        <asp:Label ID="lblPageInfo" runat="server" Visible="False"></asp:Label>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
